const path = require("path");
var nodeExternals = require("webpack-node-externals");

module.exports = {
	entry: "./src/index.js",
	output: {
		path: path.resolve(__dirname, ""),
		filename: "lim.js",
		libraryTarget: "umd", // 所有的模块定义下都可运行的方式。它将在 CommonJS, AMD 环境下运行，或将模块导出到 global 下的变量
	},
	target: "node", // in order to ignore built-in modules like path, fs, etc.
	externals: [nodeExternals()], // 忽略在 package.json dependency 的模块
};
